using System;
using System.Collections.Generic;
using ns26;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("DropdownControl")]
	public class DropdownControl : PegUIElement
	{
		public DropdownMenuItem m_selectedItem => method_3<DropdownMenuItem>("m_selectedItem");

		public PegUIElement m_cancelCatcher => method_3<PegUIElement>("m_cancelCatcher");

		public UIBButton m_button => method_3<UIBButton>("m_button");

		public MultiSliceElement m_menu => method_3<MultiSliceElement>("m_menu");

		public GameObject m_menuMiddle => method_3<GameObject>("m_menuMiddle");

		public MultiSliceElement m_menuItemContainer => method_3<MultiSliceElement>("m_menuItemContainer");

		public DropdownMenuItem m_menuItemTemplate => method_3<DropdownMenuItem>("m_menuItemTemplate");

		public List<DropdownMenuItem> m_items => method_3<Class271<DropdownMenuItem>>("m_items")?.method_25();

		public DropdownControl(IntPtr address, string className)
			: base(address, className)
		{
		}

		public DropdownControl(IntPtr address)
			: this(address, "DropdownControl")
		{
		}

		public static string defaultItemTextCallback(object val)
		{
			return MonoClass.smethod_12(TritonHs.MainAssemblyPath, "", "DropdownControl", "defaultItemTextCallback", val);
		}

		public void Start()
		{
			method_8("Start");
		}

		public void addItem(object value)
		{
			method_8("addItem", value);
		}

		public bool removeItem(object value)
		{
			return method_11<bool>("removeItem", new object[1] { value });
		}

		public void clearItems()
		{
			method_8("clearItems");
		}

		public void setSelectionToLastItem()
		{
			method_8("setSelectionToLastItem");
		}

		public object getSelection()
		{
			return method_14<object>("getSelection", Array.Empty<object>());
		}

		public void setSelection(object val)
		{
			method_8("setSelection", val);
		}

		public void onUserPressedButton()
		{
			method_8("onUserPressedButton");
		}

		public void onUserPressedSelection(DropdownMenuItem item)
		{
			method_8("onUserPressedSelection", item);
		}

		public void onUserItemClicked(DropdownMenuItem item)
		{
			method_8("onUserItemClicked", item);
		}

		public void onUserCancelled()
		{
			method_8("onUserCancelled");
		}

		public bool isMenuShown()
		{
			return method_11<bool>("isMenuShown", Array.Empty<object>());
		}

		public void showMenu()
		{
			method_8("showMenu");
		}

		public void hideMenu()
		{
			method_8("hideMenu");
		}

		public void layoutMenu()
		{
			method_8("layoutMenu");
		}

		public int findItemIndex(object value)
		{
			return method_11<int>("findItemIndex", new object[1] { value });
		}

		public DropdownMenuItem findItem(object value)
		{
			return method_14<DropdownMenuItem>("findItem", new object[1] { value });
		}
	}
}
